import Vue from 'vue'
import VueRouter from 'vue-router'
import LoginView from '../views/LoginView.vue'
import LoansHomeView from '../views/LoansHomeView.vue'
import ZhuceView from '../views/ZhuceView.vue'
import AddRepaymentView from '../views/AddRepaymentView.vue'
import PersonalDetailsView from '../views/PersonalDetailsView.vue'
import CheckView from '../views/CheckView.vue'
import ResetPswView from '../views/ResetPswView.vue'
import RepayView from '../views/RepayView.vue'
import Pay from '../views/PayView.vue'
import PayView from "@/views/PayView.vue";
import GoodsView from "@/views/GoodsView.vue";
import DetailsView from "@/views/DetailsView.vue";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: LoginView
  },
  {
    //主页面
    path: '/loanshome',
    name: 'loanshome',
    component: LoansHomeView
  },
  {
    //-商品测试-
    path: '/goodsView',
    name: 'goodsView',
    component: GoodsView
  },
  {
    //申请贷款页面
    path: '/addrepayment',
    name: 'addrepayment',
    component: AddRepaymentView
  },
  {
    //审核贷款页面
    path: '/check',
    name: 'check',
    component: CheckView
  },
  {
    //个人信息
    path: '/personaldetails',
    name: 'personaldetails',
    component: PersonalDetailsView
  },
  {
    //还款页面
    path: '/repay',
    name: 'repay',
    component: RepayView
  },
  {
    //注册
    path: '/ResetPswView',
    name: 'ResetPswView',
    component: ZhuceView
  },
  {
    //忘记密码页面
    path: '/resetpsw',
    name: 'resetpsw',
    component: ResetPswView
  },
  {
    //支付方式页面
    path: '/Pay',
    name: 'Pay',
    component: PayView
  },
  {
    //还款明细页面
    path: '/details',
    name: 'details',
    component: DetailsView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
